<?php
require_once "ramdap/ramdap_object.php";
require_once "ramdap/ramdap_except.php";
require_once dirname(__FILE__) . "/../ldap_unittest_create.php";

function createTestUser() 
{
    try {
      $rats = new Rass(SUPERUSER, SUPERPWD, BASE);
      $rats->setSSL(True);
      $newUser = $rats->createUser(USER, EMAIL, PWD);
      $newUser = $rats->createUser(SEC_USER, SEC_EMAIL, SEC_PWD);
    }
    catch(Zend_Gdata_App_Exception $e) {
      assert(False);
      # Report the exception to the user
      echo "\nCaught exception: " . get_class($e) . "\n";
      echo "Message: " . $e->getMessage() . "\n";
    }
}

function deleteTestUsers() {
  try {
    $rats = new Rass(SUPERUSER, SUPERPWD, BASE);
    $rats->setSSL(True);
    $newUser = $rats->deleteUser(USER);
    $newUser = $rats->deleteUser(SEC_USER);
  }
  catch(Zend_Gdata_App_Exception $e) {
    assert(False);
  }
}
